package com.atguigu.yygh.order.listener;

import com.atguigu.yygh.common.config.MqConst;
import com.atguigu.yygh.order.service.OrderService;
import com.atguigu.yygh.vo.msm.MsmVo;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 杨林
 * @create 2022-11-20 21:06 星期日
 * description:用于监听就医提醒服务
 */
@Component
public class OrderReceiver {

    @Autowired
    private OrderService orderService;

    @RabbitListener(bindings = @QueueBinding(
            value = @Queue(MqConst.QUEUE_TASK_8),
            exchange = @Exchange(MqConst.EXCHANGE_DIRECT_TASK),
            key = {MqConst.ROUTING_MSM}
            ))
    public void patientTips(MsmVo msmVo){
        orderService.patientTips();
    }
}
